<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,user-scalable=0"/>
    <meta content="yes" name="apple-Mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <!--Use for debugging must be removed under production -->
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" CONTENT="no-cache">
    <meta http-equiv="Pragma" CONTENT="no-cache">
    <!-->
    <title>拍书献爱心#宁波印象城・蔡康永的秘密书房展</title>
</head>

<body>

</body>
<script src="js/common.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<script>
    (function () {
        var $body = document.querySelector('body');

        var script = document.createElement('script');
        script.src = './js/progress.js?t=' + (+new Date());
        $body.appendChild(script);
        var $head = document.querySelector('head');
        var link = document.createElement('link');
        link.rel = 'stylesheet';
        link.href = 'css/progress/progress.css?t=' + (+new Date());
        $head.appendChild(link);
    })();
    var xhr = new XMLHttpRequest();
    var url = window.location.href;
    var tl='http://query.viscovery.net.cn/preHeat/preHeat.html';
    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4 && xhr.status == 200) {
            var config = JSON.parse(xhr.responseText);
            var sharedData = {
                desc: '拍书献爱心#宁波印象城・蔡康永的秘密书房展',
                link:tl,
                imgUrl:'http://query.viscovery.net.cn/preHeat/res/img/cky.jpg'
            };
            wx.config({
                /*debug:true,*/
                appId: config["appId"],
                timestamp: config["timestamp"],
                nonceStr: config["nonceStr"],
                signature: config["signature"],
                jsApiList: [
                    'uploadImage', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'chooseImage'
                ]
            });
            wx.ready(function(){
                wx.onMenuShareAppMessage({
                    title: sharedData.title,
                    desc: sharedData.desc,
                    link: sharedData.link,
                    imgUrl: sharedData.imgUrl
                });
                wx.onMenuShareTimeline({
                    title: sharedData.title,
                    desc: sharedData.desc,
                    link: sharedData.link,
                    imgUrl: sharedData.imgUrl
                });
            })

        }

    }
    xhr.open('get', '../wechat/wxconfig.php?' + url, true);
    xhr.send();
</script>
</html>